package cn.fbs.enums;

public enum  XmlFieldEnum {

    FILE_NAME("FILENAME",1),
    FILE_TYPE("FILETYPE",2),
    TARGET_NAME("TARGETNAME",3),
    TARGET_TYPE("TARGETTYPE",4),
    COUNTRY("COUNTRY",5),
    SHOT_DATE("SHOTDATE",6),
    SHOT_PLATFORM("SHOTPLATFORM",7),
    LONGITUDE("LONGITUDE",8),
    LATITUDE("LATITUDE",9),
    STATUS("STAT",10),
    POSITION("ZZFW",11),
    LOCATION("ZDZZBW",12),
    AREA("MBSZQY",13),
    DISTANCE("CXJL",14),
    CLEAR("CXQXD",15);

    private String name;
    private Integer index;

    XmlFieldEnum(String name, Integer index) {
        this.name = name;
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public Integer getIndex() {
        return index;
    }
    public static String getName(Integer index) {
        for (FileNameEnum fileNameEnum : FileNameEnum.values()) {
            if (fileNameEnum.getIndex().equals(index)){
                return fileNameEnum.getName();
            }

        }
        return null;
    }
}
